/*
 * FabricaFormatos.java
 *
 * Created on September 14, 2005, 10:23 AM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package ig.formato.util;
import javax.swing.InputVerifier;
import javax.swing.JFormattedTextField;
import javax.swing.text.DefaultFormatterFactory;
import javax.swing.text.MaskFormatter;/**
 *
 * @author edjaiv
 */
public class MetaFabricaFormateadores {
    
    /** Creates a new instance of FabricaFormatos */
    public MetaFabricaFormateadores() {
    }
    
    public static DefaultFormatterFactory getDateFormatterFactory(){
        DefaultFormatterFactory dff = new DefaultFormatterFactory();
      try{
            JFormattedTextField.AbstractFormatter displayFormatter = new MaskFormatter("##/##/####");
            dff = new DefaultFormatterFactory(displayFormatter, displayFormatter, displayFormatter);
        }catch (Exception e){
            e.printStackTrace();
        }    
        return dff;
    }
    
    public static InputVerifier getDateVerifier(){
        return new DateVerifier();
    }
    
}
